<script lang="ts" setup>
import { computed } from 'vue';
import type { UploadUserFile } from 'element-plus';

const props = defineProps<{ file: UploadUserFile }>();

const url = computed(() => props.file.url || URL.createObjectURL(props.file.raw!));
</script>

<template>
  <img :src="url" style="width: 100%; border: 1px solid #ccc;" />
</template>
